extends ../base.pug
block title
  title 牌局记录
block style
  style.
    body {
      font-family: PingFangSC-Medium, "Helvetica Neue",Helvetica,"Roboto",Arial,sans-serif;
    }
    .match-share {
      padding: 0 20px;
    }

    .match__header {
      margin-left: -20px;
      margin-right: -20px;
      height: 60px;
      background: #66B5F0;
    }

    .match__header img {
      position: relative;
      max-width: 65px;
      left: -10px;
      top: -10px;
    }

    .game__title,
    .duration__title,
    .match__title {
      //- margin-right: 12px;
      color: #4A4A4A;
    }

    .match__game,
    .match__duration,
    .match__results {
      margin-top:16px;
    }

    .game__count,
    .duration__text {
      color: #66B5F0;
    }

    .match__player {
      margin-top: 12px;
    }

    .match__player {
      display: flex;
      flex-direction: row;
      align-items: center;
    }

    .player__avatar {
      width: 70px;
      height: 70px;
      border-radius: 50%;
      overflow: hidden;
    }

    .player__avatar--empty {
      line-height: 68px;
      text-align: center;
      border: 1px solid #FBFBFB;
      font-size: 34px;
      background: #ccc;
      color: #403B3B;
    }

    .player__name {
      margin-left: 16px;
      font-size: 18px;
      color: #66B5F0;
    }

    .player__score {
      margin-left: auto;
      font-size: 24px;
      color: #F15A5A;
    }

    .player__score--positive {
      color: #519B00;
    }

    .player__score--negative {
      color: #F15A5A;
    }


block body
  .match-share
    .match__header
      img(src="/images/icon_tong.png", alt="logo")
    .match__game
      span.game__title 总局数：
      span.game__count #{match.gameCount || 0}
    .match__duration
      span.duration__title 总时长：
      span.duration__text #{match.durationFormat}
    .match__results
      .match__title 当前输赢：
      .match__players
        each player in match.players
          .match__player
            if player.avatar
              .player__avatar
                img(src=player.avatar, alt="avatar")
            else
              .player__avatar.player__avatar--empty #{player.name.substring(0, 1)}
            .player__name #{player.name}
            if player.score >= 0
              .player__score.player__score--positive +#{player.score}
            else
              .player__score.player__score--negative #{player.score}



